#include <gui/settingpage_screen/SettingPageView.hpp>
#include <gui/settingpage_screen/SettingPagePresenter.hpp>

SettingPagePresenter::SettingPagePresenter(SettingPageView& v)
    : view(v)
{

}
//
void SettingPagePresenter::activate()
{
		SettingPagePresenterState(true);	
}
//
void SettingPagePresenter::deactivate()
{
		SettingPagePresenterState(false);	
		model->drainWaterStatus(false);	
}
//SettingPagePresenter状态
void SettingPagePresenter::SettingPagePresenterState(bool enable)
{
		if(enable == true)
			model->SettingPageViewTask(true);
		else
			model->SettingPageViewTask(false);
}
//页面跳转
void SettingPagePresenter::SettingPageChange(uint8_t newFiveKeyFunc)
{
		view.SettingPageChange(newFiveKeyFunc);	
}
//排水操作
void SettingPagePresenter::drainWaterStatus(bool enable)
{
		model->drainWaterStatus(enable);	//排水设置
}